package com.atguigu.spring.service.impl;

import com.atguigu.spring.service.api.TigerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class TopService {

    @Autowired
    private TigerService tigerService;

    @Transactional
    public void topOperation() {
        Integer tigerId = 5;
        String tigerName = "金渐层2025";
        tigerService.updateTigerNameById01(tigerId, tigerName);

        tigerId = 6;
        tigerName = "银渐层6666";
        tigerService.updateTigerNameById02(tigerId, tigerName);
    }

}
